package com.example.qxfw.qxxx.entity;

/************************************
 *
 * @author : HuangDeYin Jolly
 * @since : JDK 11
 * @Date : 2023/8/14  星期一   15:27
 * @description : 此类用来
 ***************************************/
public class LongitudeLatitudeValue {

    //纬度坐标
    private double latitude;
    //经度坐标
    private double longitude;
    //值
    private double value;

    public LongitudeLatitudeValue() {
    }

    public LongitudeLatitudeValue(final double latitude, final double longitude, final double value) {
        this.latitude = latitude;
        this.longitude = longitude;
        this.value = value;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(final double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(final double longitude) {
        this.longitude = longitude;
    }

    public double getValue() {
        return value;
    }

    public void setValue(final double value) {
        this.value = value;
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        final LongitudeLatitudeValue that = (LongitudeLatitudeValue) o;

        if (Double.compare(that.latitude, latitude) != 0) return false;
        if (Double.compare(that.longitude, longitude) != 0) return false;
        return Double.compare(that.value, value) == 0;
    }

    @Override
    public int hashCode() {
        int result;
        long temp;
        temp = Double.doubleToLongBits(latitude);
        result = (int) (temp ^ (temp >>> 32));
        temp = Double.doubleToLongBits(longitude);
        result = 31 * result + (int) (temp ^ (temp >>> 32));
        temp = Double.doubleToLongBits(value);
        result = 31 * result + (int) (temp ^ (temp >>> 32));
        return result;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("LongitudeLatitudeValue{");
        sb.append("latitude=").append(latitude);
        sb.append(", longitude=").append(longitude);
        sb.append(", value=").append(value);
        sb.append('}');
        return sb.toString();
    }
}
